<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
  </head>
  <body>
    <div id="app">
      <ul>
        <li v-for='(item,index) in arr' :key='item.id'>
          <input type="checkbox" name="" id="">{{item.name}}</li>
      </ul>
      <button @click=add>点击添加</button>
    </div>
    <script src="./vue.js"></script>
    <script>
      const vm=new Vue({
        el:'#app',
        data:{arr:[{id:1,name:"little"},{id:2,name:"cici"},{id:3,name:"bobo"}]},
        methods:{
          add(){
            this.arr.unshift({id:4,name:"lucy"})
          }
        },
       })
    </script>
  </body>
</html>